NetBSD build fixes