Measurement of the wavefunction for a biphoton state with homodyne detection using least squares estimation