adding explicit cast to u_int32_t for arc4random_uniform

See http://stackoverflow.com/questions/23725579/arc4random-uniform-64-bit-ios for more explanation of this fix.