Define _GNU_SOURCE for strptime_l

Without this we get -Wimplicit-function-declaration warnings from GCC on
non-Linux glibc-based architectures.
Pass a valid locale name to newlocale

FreeBSD libc treats a NULL second argument to newlocale as equivalent to
"C", but glibc returns an error in that case, causing a segfault shortly
afterwards when passing a NULL locale to strftime_l/strptime_l.