First detection of cyanamide (NH2CN) towards solar-type protostars