Support CakePHP 2.x

Modified helper to support CakePHP 2.x