Fix const usage in the random module.