Make the code compatible with Ruby 2.0