Use guaranteed random number generator.

Fixes #4352