Gaussian maps, the Zak map and projective extensions of singular varieties