Modified build script to support external linkage