issue #4544: fix memory leak of XMLHTTPRequest with sendImmediate