Made code adaptable to IE environment.

In case of Microsoft's Internet Explorer, we need to use the ActiveXObject instead of XMLHttpRequest.