Fix build with master

- fixed identifiers, now after the renames in master passed
- fixed windows build
- fixed config.m4 with possible libstdc++ linkage bug

So far tests past on master/windows.
Unfortunately it needs to be here, otherwise it causes linking issues on Windows. IMHO cleaner were even not to include a cpp file, but add it to the compiler separately.