update build script to minimize the final library size.