Add a wrapper for getenv so it also checks the registry on Windows.