added apple compatibility with malloc.h