Fix overriding CMAKE_BUILD_TYPE variable if already set.