Fix linking problems on DragonFly