Acceleration of electrons by interplanetary shocks