change random() to rand()

For MinGW32