Fix for issue #241 - Wrong responseXML for text/plain requests

When using synchronous requests, the readyState was not properly changed to HEADERS_RECEIVED which caused getResponseHeader to always return null. Due to this behaviour the Content-Type could not be determined in setResponseBody and responseXML was created for all types of content.