Fix crash in non-threaded RTS on Windows