Second harmonic generation from tetragonal centrosymmetric crystals