similar fix to the one implemented by Symfony Request object

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L1127 to allow for loadbalanced secure connections to have the host for the callback automatically determined, without creating Symfony dependency.  Also set it to not fire notices when referenced from CLI.