configure: MinGW has thread-safe getenv.