Mersenne twister in Google Closure style ( https://gist.github.com/banksean/300494 )