compat: MUSL implementation of strptime()

On Windows there's no strptime(). A similar functionality is available
from C++11's `std::get_time` in `<iomanip>`, but there are subtle
differences, including actual behavioral differences when parsing
invalid dates such as "January 41st" (which is invalid everywhere, and
could become "January 4th", eating one char less), or Feb 29th, 2018
(which does not exist).

Let's just import the MIT-licensed implementation from the MUSL C
library because it's reasonably self-contained and appears to work the
same as the glibc one.
diff --git a/compat/compat.h.in b/compat/compat.h.in
index 64c916b..6bc45fd 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -63,6 +63,7 @@
 #cmakedefine HAVE_TIME_H_TIMEZONE
 #cmakedefine HAVE_REALPATH
 #cmakedefine HAVE_LOCALTIME_R
+#cmakedefine HAVE_STRPTIME
 
 #ifndef bswap64
 #define bswap64(val) \
@@ -168,4 +169,8 @@
 struct tm *localtime_r(const time_t *timep, struct tm *result);
 #endif
 
+#ifndef HAVE_STRPTIME
+char *strptime(const char *s, const char *format, struct tm *tm);
+#endif
+
 #endif /* _COMPAT_H_ */