Fix Windows-specific warnings in the Socket script API
Fix Windows regressions