Added stdlib.h include

It was missing when compiling on some platforms.