Update configure check to emulate AC_HEADER_DIRENT
Update configure check to emulate AC_HEADER_DIRENT

That way the variables HAVE_SYS_NDIR_H/HAVE_SYS_DIR_H/HAVE_NDIR_H
will set only if HAVE_DIRENT_H have not been set.

See http://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Headers.html

adrianbroher/python-cmake-buildsystem,jcfr/python-cmake-buildsystem,chuckatkins/python-cmake-buildsystem,msmolens/python-cmake-buildsystem,davidsansome/python-cmake-buildsystem,thewtex/python-cmake-buildsystem,thewtex/python-cmake-buildsystem,python-cmake-buildsystem/python-cmake-buildsystem