Magnetic-Field-Induced Second Harmonic Generation in Semiconductors and Insulators