Edit ajax function for IE9 support.