Fix Compiler Warnings for PHP 5.4+

See #1001