Use existing HAVE_OPENDIR define to determine if a generic implementation should be provided. Cygwin for example has its own implementation of opendir() and dirfd(). Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>