fix HAVE_POLL detection, remove cruft