Is it possible to make Heroku install the mongodb NPM package with the C++ BSON parser?

Locally, I can run npm install --mongodb:native to get npm to compile and install the C++ BSON parser, but I can't replicate the same action on Heroku.

I tried adding a pre-install command npm install mongodb --mongodb:native to package.json but npm isn't actually available on the path in the Heroku environment.

Looking at the source for the mongodb package, it looks like it's looking for an environment variable (created by npm based on the command line argument I guess). Maybe there's a way of injecting that into the Heroku build environment?

BSON (de)serialisation is becoming a big CPU + memory hog for my app, and the C++ parser helps alleviate this.