Better detection of node environment.