The solution of the inverse spectroscopic problem for the IR spectra of trans- and cis-hexatrienes