Fix Pkg.installed checks that were causing precompilation to fail