msvcrt: Reimplement rand() and srand() to use per-thread data for the