A better check for Node.JS which takes into account the fact that some browser deployments may use CommonJS rather than AMD.