Charging of dielectrics under ion irradiation