Israel said the ten apartment buildings had been built illegally and posed a security risk to Israeli armed forces