Algebraic geometry tools for the study of entanglement: an application to spin squeezed states