C++ Windows fixes.

Particularly interesting is src/engine/Makefile.am: Having a mention of
target_CFLAGS in an #if disables automatic use AM_CFLAGS even when the
#if condition is false.