Fixes incompatibility with CMS 2.x

Once 3.x is released we could add a deprecation warning.