EZP-20669: fix segmentation fault with PHP 5.3.3