Theory of phase characterization of harmonics through interference with the fundamental