Controlling the Kondo Effect of an Adsorbed Magnetic Ion Through Its Chemical Bonding