Credit Andrew with NetBSD build fixes