Use cryptographically secure random if available.

We use random.SystemRandom() if available, since it uses the
system-provided cryptographically secure PRNG.