fix workaround for XDomainRequest only when it's available