C++ fixes

Here are some fixes to be able to use some Mono headers from C++ source files.