Using sources of stdlib.h without including it

Fix issue when trying to use rand() and RAND_MAX without including stdlib.h.