Malloc fix for OS X