Mersenne twister for JavaScript