fix for Uncaught TypeError

Prevents "Uncaught TypeError: Object #<Object> has no method 'abort'"
error for case when non-jQuery promise is used as a handler (AngularJS
$promise for example).
Merge pull request #1923 from riatiger/master

fix for Uncaught TypeError: Object #<Object> has no method 'abort'