Add stdlib.h for malloc/realloc/free on some platforms