Actually use seedrandom.

The tests are run in a sandboxed environment, and so didn’t have access to the
same global Math whose random was being overridden.
Merge branch 'master' into 3.4