Fix Nokogiri installation so it works on both Ubuntu and RHEL