Add build script for javascript based on closure
fixes for build.py