Structure-sensitive changes in the terahertz absorption spectra of merocyanine dye derivatives