Improve obj_mac.h generation and remove #include <malloc.h>