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).