Fixed build with mingw

_localtime32 was removed from the runtime because it was only avalible at
some Windows versions.
Maybe the time_t* cast could be used on all systems?