add C mangling depending on toolchain (needed for OSX)