The prime minister says it is "un-British" to hold pro-Palestinian protests on the second anniversary of Hamas's attacks on Israel.