(D3D) Add some more ifdefs for portability purposes