Add missing #include <cstdlib> (needed for malloc and free)