Walk-off compensation of second harmonic generation in type-II phase-matched configuration with controlled temperature