Backport defines from cm-10.1