Understanding the inelastic electron-tunneling spectra of alkanedithiols on gold