Fix conditional version check for NPM_VERSION

This fixes #417