Comparison of terahertz waveforms measured by electro-optic and photoconductive sampling