MAP_ANONYMOUS is not defined on OS X
added failure indicator for cs_rand_range