Romney, Obama spar over foreign policy