A Syrian man was arrested after a shooting near the US embassy in Beirut, which he claimed was carried out "in support of Gaza".