Fix segfault in PHP 5.5