STREAM-329: updates to make tcp::connection::cancel() work on windows