cake 2.4x comptability

Updated to support the newer forms of the behavior hooks from Cake 2.4.x