fix specs
require json if the ruby version is 1.8.7