Electron density profiles at charged metal surfaces in the weighted density approximation