Coadsorption of hydrogen and carbon monoxide on nickel and platinum