fixed compatibility issues with Ruby 1.8.7
Merge pull request #41 from n1te1337/187-compatibility

fixed compatibility issues with Ruby 1.8.7