Testing for a unit root by frequency domain regression