Issue #2307529 by gdl: PHP 5.3 compatibility