Use srand rather than less portable srandom