Ported to Ruby 2.0

This PR makes the library compatible with Ruby 2.0.