Tuning of second-harmonic generation in waveguides induced by photorefractive spatial solitons