Fix build errors when using optional switches.

Hi @bormind , I'd like to merge `feature/minified_build` to `develop`.

This fixes the minified optional build.

The syncload build error is also eliminated by correcting the include path.