Local-field corrections in the calculation of electronic stopping power