Add time_r module. Change timegm, mktime, and strftime to use localtime_r