adapting build script from mapapi.js to perform minification locally.

Should fix parent issue #4