The determination of S-wave polarization angles for an earth model with crustal layering