fix compile issue on php > 5.3