Tweaks to library handling on linking and install