Added support for synchronous XHR requests