Fixed install for nokogiri on fedora 18 and CentOS

As discussed on IRC with @mpapis.