Fix syntax errors for PHP 5.3