The role of carbon in methanation by cobalt and ruthenium