Current-induced second harmonic generation in inversion-symmetric Dirac and Weyl semimetals