Electronic transfer and ligand effects in the infrared spectra of adsorbed carbon monoxide