US defense secretary directs Pentagon to defend midterm elections from 'foreign threats'