Keep the --global flag when calling ghc-pkg.