add php5.2 support