Carbon monoxide in the Magellanic Clouds