polarssl: fix handling SSL close notification