Second-harmonic generation in reflection and diffraction by a GaAs photonic-crystal waveguide