Use configured version of npm to build the js driver

Review 786 by @mlucy
Closes #1204