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.
Yeah, IMHO that is fine, many libraries don't support 64 bit length strings, so even we had size_t for all - there were many places to check for overflows. Anyway, this is what the current status is so it works with master.