fixed linux portability, use libsodium random*() stuff