Moved misplaced #endif.
localtime_r and gmtime_r were not being defined when missing in MinGW
builds. This fixes the bad #if.