update build script to link static libraries