Fix prototype of random() and move to stdlib.h