Changes to make $.ajax work in IE8 and IE9