Conditions for spin squeezing in a cold87Rb ensemble