Fixes an issue in PHP 5.3

Absence of PHP_QUERY_RFC3986 means we need to do this manually
Addresses a PHP bug that might arise from setting default to null

https://bugs.php.net/bug.php?id=54143