fix ruby 1.8 compatibility
Merge pull request #3 from domcleal/ruby18

fix ruby 1.8 compatibility