adjust a couple of ifdefs to handle NetBSD correctly