Build fixes to normal CMake invocation