Fix malloc on darwin