Fixed rand.c compiler issues