Barack Obama says US troops will not fight on foreign soil