Fixed getenv "identifier not found" errors