Revert "use js variable for rand_seed"

This reverts commit 3e31f83ac762e34b266b7888aec161bb2b843dd1.
fix rand_r; add rand_r in test_rand