generators: Improve library symlinking