A mean-field spin-orbit method applicable to correlated wavefunctions