The Mayor of New York, Zohran Mamdani, has spoken out on the pro-Hamas singing during heated protests outside a synagogue in Queens.