Wire-grid polarizer in the terahertz region fabricated by nanoimprint technology