fix "make syntax-check"
There were several tiny problems that causes "make syntax-check" to
fail. Many were fixed by excluding them in cfg.mk, others by making
tweaks to the source. None of the changes have a functional effect on
the binaries that are produced.