Clean up CMakeLists.txt and fix for MinGW cross-compile.

git-svn-id: http://mancubus.net/svn/hosted/eternity/trunk@2434 86ba831e-150c-0410-ab35-e06eaae15ed9