kBuild 3390 -> 3428: Fixed kmk_redirect issue on windows. Some optimizations (currently windows only) and legacy variable cleanups.