Fixed compatibility with Ruby 1.8.7
Merge pull request #9 from mleglise/ruby-1.8-compat

Fixed compatibility with Ruby 1.8.7