FIX inline rand_r to fix build on Windows

XXX Why does building a DLL from two source files fail?