Raman and Brillouin scattering of electromagnetic waves in inhomogeneous plasmas