Fix linking on OpenBSD, as suggested by kpederse1