added support for older XHR