The circumstance you're describing isn't that of illegal appropriation of lands by the mosque (which would be outright haraam) but violation of municipal laws. This does not make the mosque illegal but makes the management or whoever was responsible for this guilty. Also, have you spoken to the management of the mosque if what you believe to be the case is actually the case? It may be that the mosque management may have come to an understanding with the municipal government to permit these apparent breaches of municipal law.