Fixes for js build.