d3d12: Fixes compile error with mingw/gcc-x64 when static linkage to runtime library

Closes #6968

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Suggested-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Part-of: <mesa/mesa!17889>
(cherry picked from commit b6fb2da6)
88 jobs for !17989 with staging/22.2 in 11 seconds (queued for 13 seconds)
merge request