Update before_install script

`npm install -g` is more stable way to install the latest version globally.