swrap: remember the libc_close() errno in swrap_close()