A quantitative study of the environmental effects on the optical response of gold nanorods.