make compatible changes for php5.3