Treat DragonFly the same way as FreeBSD.
This fixes build on DragonFly 3.7 as reported by David Shao in PR pkg/48660.
fixes build on NetBSD-6, strncat is defined as a macro.