ensure that npm environmental config gets used

Fixes npm/npm#6483.

/cc @iarna for review / knowledge-sharing @wilmoore because he identified this bug.