fix places where _BSD_SOURCE failed to yield a superset of _XOPEN_SOURCE