Fix compilation on NetBSD