Add support for recent GCC versions

GCC 4.7 is partially compiled with C++ and that breaks mangling.
GCC 4.8 is built as C++, so plugin needs to built with C++ compiler
as well.