We need _BSD_SOURCE to get MAP_ANONYMOUS
Changes to get code compiling under --std=c99

Well, almost. Really, it's Posix 2001.12, since we need some things that
aren't strictly C99, like AI_V4MAPPED and AI_NUMERICHOST.