javascript: minor fixes for NPM package