PHP < 5.3 fix for init hook