Be compatible with Ruby 1.8
Merge pull request #3 from gunyoki/ruby18_compatible

Be compatible with Ruby 1.8