A spectral-domain method for the electromagnetic scattering from a multilayered sphere buried in a stratified medium