add fix for php smaller 5.3, fixed #13