CMake d3d fixes