Fixes to make compatible with CakePHP 2.5.x