Fix undefined Windows constants on non-Windows platforms