Use getenv() in environment detection