Refactored proxyhost/proxycredentials setting to allow caller defined
proxy authentication to be used.