Some #includes were missing for the latter (but only noticeable on some systems - e.g., build breaks on Cygwin). So let's replace with something that works equally everywhere. Fixes: #2060
and whitespace.
I.e., do not hard-code guile-2.2, it may be guile-3.0 instead.
Do a (superficial) port to c++ of some of the c sources. Update deps. Fix a few compiler warnings.