FDStream (Windows): call shutdown before closesocket