Apparently this is preferred:
```javascript
var beforesendCallback = function beforesendCallback(xhr, settings) {
 ...
}
```