rtld: call close(2) after errno is saved
(cherry picked from commit 741d78126b5584e860811c78f87f51597e375592)