Electromagnetic Field Generation in the Downstream of Electrostatic Shocks Due to Electron Trapping