Ajax: simplify XHR detection.

Closes #1967 

```
raw     gz Compared to master @ ab20d9d24f0a95df382c02e9ef3dcc4adb86e4f1    
-124   -30 dist/jquery.js                                                   
-46    -31 dist/jquery.min.js
```