The impact of mass density variations on an electron Monte Carlo algorithm for radiotherapy dose calculations