Description of the influence of charging on the measurement of the secondary electron yield of MgO