Add portability for NetBSD.