[cxx] Fix mono-boehm to compile as C++. (mono/mono#18086)
https://jenkins.mono-project.com/job/test-mono-pull-request-i386/32263/consoleText
```
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
boehm-gc.c: In function 'void mono_gc_base_init()':
boehm-gc.c:202:42: error: invalid conversion from
'void (*)(size_t) {aka void (*)(unsigned int)}' to
GC_on_heap_resize_proc {aka void (*)(long unsigned int)}' [-fpermissive]
GC_set_on_heap_resize (on_gc_heap_resize);
^
In file included from ../../mono/utils/gc_wrapper.h:44:0,
from ../../mono/metadata/gc-internals.h:16,
from boehm-gc.c:16:
../../external/bdwgc/include/gc.h:132:21: note:
initializing argument 1 of 'void GC_set_on_heap_resize(GC_on_heap_resize_proc)'
GC_API void GC_CALL GC_set_on_heap_resize(GC_on_heap_resize_proc);
```
Commit migrated from https://github.com/mono/mono/commit/
5cbb1f4be8a0434ad92c39dfcece15f51f920e5b