Use ANSI C rand instead of POSIX random.