Some minor cleaning up of our common CMake file.
Enable more warnings on OS X, resulting in some fixes here and there.