Terahertz emission from thin metal films with porous nanostructures