Adapt c-c++-common/tm/malloc.c for Solaris headers with C++