ie8 support

the previous code for ie does not work for me. The response could not be parsed correctly by browser.

after my simple change it started working for ie8