A Novel Configuration for Phase-Matched Second-Harmonic Generation in LiNbO$_3$ Waveguides