add link flags for libz, libbsd, and libedit