(Maint) Use rand that is available on ruby 1.8.7

Random didn't appear until ruby 1.9.2, but the Kernel.rand has been
around for a long time and is on all of our supported ruby versions.