Support Ruby 1.9

Please merge this branch to add supporting Ruby 1.9+.