Observation of a near-surface structural phase transition in SrTiO3 by optical second harmonic generation