Making signal handling ruby 2 compatible

by stealing the pattern used in Sidekiq :scream_cat:.
Merge pull request #344 from meatballhat/ruby-2-compatible-signal-handling

Making signal handling ruby 2 compatible