add support for Windows time functions
MinGW implements the _r functions as static inline versions of the _s ones but MSVC does not.
The _s functions are implemented the same way as wrappers over _localtime64_s or _localtime32_s for MSVC < 2005.
Signed-off-by: Rosen Penev rosenp@gmail.com