Improved code sharing between xios and monomac.