Replace deprecated and long-gone defer.setTimeout with Deferred.cancel