Libyan authorities have accused aid groups of plotting to change the country's ethnic make-up by encouraging African migrants to stay there, and has ordered them to close their offices.