Imported missing logic from chh/heroku-buildpack-php bin/compile_node