Kosterlitz-thouless-type metal-insulator transition of a 2D electron gas in a random magnetic field