Improve XHR detection

This avoids an exception in IE8

```
SCRIPT438: Object doesn't support this property or method
```