Start transition to CMake. Added temporary fixes for Haiku build.