tsan: do not crash when apparently bogus fd is passed to e.g. close

some tests test libc/filesystem error handling paths (e.g. close(INT_MAX)),
currently such tests fail
with this change they work as expected