Ruby 1.8 support

Thanks for this. Just one little thing to let it work with Ruby 1.8.