Work around missing Rand class.