Move poll() out of pkc_conn.c, add a select() based fallback