fix preinstall script to work with npm ( fixes issue where if fails to install package if `yarn` is not present.