fix for changes to Net::HTTP in ruby 2