Terahertz response of carbon nanotube/metal heterojunctions