Add some capacitors to the MCLR. Maybe 0.1 uF and 2.2uF and hopefully you can still program the pic. If you have a long trace on the pcb to the programming connector you can also try to add the capacitors close to the connector since that trace will act like an antenna.