Fix node environment detection