Replacing references to malloc.h with the standard stdlib.h