Terahertz generation with tilted-front laser pulses in a contact-grating scheme