Make testsuite fd leak check work on more platforms