Require _XOPEN_SOURCE to build

Fixes random segfaults