modifications to allow cross-compilation to win32