Use referenced projects when linking in AGREE (fixes #4)