allow http.Agent usage

by passing in an `http.Agent` instance (either `http.globalAgent` or a new instance) to the XMLHttpRequest constructor