[COOK-4468] Only set ENV variable when needed

When setting the environment variable to use system libraries,
'nokogiri' will use system libraries no matter what value the varible is
set to.

Also, the latest versions of `nokogiri` fail to compile with system
libraries on ubuntu[1].

[1] https://github.com/sparklemotion/nokogiri/issues/1099