Include stdlib.h for malloc

malloc.h is deprecated and unportable
Merge pull request #47 from AMDmi3/patch-1

Include stdlib.h for malloc