Fix deprecations and test on Ruby 2.0.0