Optical absorption due to the vibrations of defects