Ruby 2.0 support

Makes it work with ruby 2.0. Tests look fine when run with 2.0.