Fix XHR responseType bug in Safari