fix to support ruby 1.9
Merge pull request #7 from Tombar/master

Quick hack to support ruby 1.9+