Dynamic polarizability and Rayleigh spectra of carbon nanoparticles