Fix there were PHP < 5.4 incompatible codes
Applied changes of behavior callback signature from Cake 2.4.1