Vibrational spectra and structure of polyaniline and related compounds