util/rand_xor: add function to seed rand