Phase‐matched second‐harmonic generation in solid thin films using modulation of the nonlinear susceptibilities