make the hGetBuf/hPutBuf family work with non-FD Handles (#4144)