I'll take domain mentions any day.
Here's an article on Moz...
https://moz.com/blog/panda-patent-brand-mentions
Lots of people make gifts to get their biz name on a brick, get their biz name on a plaque, get their biz name on a race car, get their biz name on the outfield wall, get their biz name on a huge sports arena - or a building or a law school. So there is nothing wrong with giving a gift to the library and having your domain - the name of your biz - listed on a webpage. If they charge you more to link it then its a paid link, if they don't charge you for the link its not paid. You should make the gift for the purpose of doing good, not for the link.