fix postinstall script

There was a problem with installing bitcore as a dependency, as reported in https://github.com/bitpay/bitcore/issues/138

This fixes that problem