Al-Qaeda has claimed responsibility for an attack on the Israeli embassy in Mauritania, which wounded at least three bystanders.