Remove unused defines.
Generate config header in CMake build.

Fixes #238.
Ignore "build" directory.

This is the traditional CMake working directory.