Thermo-optic detection of terahertz radiation from a quantum cascade laser