modify for ruby 1.8 support
Merge pull request #68 from mattrose/master

modify for ruby 1.8 support