build: use -fno-ipa-icf -fno-clone-functions for C++ code