Added json dependency for Ruby 1.8 and below