Disable rand_r at compile time on Windows.

(Sort of) fixes #944. Falls back to a less desirable, but still somewhat reasonable, behaviour if a user happens to be unlucky enough to be using Windows.