fixed bug in extracting libraries from packages that broke things
linked against libncurses.