#831 Fix support for PHP 5.4 and lower