Mersenne Twister pseudorandom number generator (origin https://gist.github.com/banksean/300494)