[cmake] Shorten FreeBSD and DragonFly checks as suggested post-commit