Add support for close notification for NIX based OSes and SerialPort.