Added compatability for browsers not supporting xhr responsetype json