workaround a netbsd bug where they did not compile with d1_meth.c

This is a potential fix for NetBSD's crazy bug where they didn't compile with d1_meth.c but left the headers present. It is fixed upstream but we should decide whether we want to land this fix or have the packagers for NetBSD maintain this patch themselves.