Donald Trump has said the US "will retaliate" after three Americans were killed in a suspected Islamic State attack in Syria.