More careful about name mangling and C++ compatibility.