Changes to allow the gem to work on Ruby 1.8.7