Fix strptime thread safety.