Adding PHP5.3 compat to ResMgr