Windows port: various fixes for the cmake build system

Disable RTTI for visual studio as well, fix for static boost linking, and don't use LLVM bitcode for mingw build.