Workaround for a bug in strptime() with threads