A JavaScript module supporting automatic switching between XDomainRequest and XMLHttpRequest for IE8 and 9