Fixed bug "can not get fd from curl instance" on MacOS and Windows