Add parameters of Random and add HAVE_PTHREAD macro check
Make Random unserializable