Forgot to set policy for CMake.
Some GCC 4.6 compatibility changes.
Fixed a couple of linkages wrongly removed.