US president’s comments come as defence secretary is grilled over dispatching of Marines to ‘enforce immigration law’