add support for windows to platform.cpp