remove nokogiri dependency for old versions

I tested it with nokogiri 1.6 and all tests are passing