Fix compile errors for Windows8 and WindowsDX.