CMake generates nicer projects in Mac OSX

Should work correctly to generate 32/64 bit builds, compiler flags are a bit
less hacky, other CMakeLists cleanups.