Token generation on Windows

`/dev/urandom` does not exists on Windows, so I added an OS check when generating a token