Second harmonic generation of cuprous oxide in magnetic fields