Contributed patch: handling c++, non GCC compiler