Fix "deadlock" in w32stape.c close function