Don't allow npm state to be used if npm module not available

This prevents a traceback (as seen in #5934) when one tries to run an
npm state when the npm module is not available, by preventing the npm
state from loading using the __virtual__() function.