Make client middleware compatible with both Sidekiq 2 and 3
Issue #25