Add _XOPEN_SOURCE=600 to CPPFLAGS on NetBSD.