Generation of spin squeezing in an ensemble of cold rubidium 87