httpc: use poll to check for the EINPROGRESS state