dirfd is not available on Solaris 10, it is available on latest
OpenSolaris releases though. Do some autoconf trickery to determine if
providing an alternative dirfd function is necessary and possible.
shlibs/blkid/src/read.c: Do not define _XOPEN_SOURCE to 600, or DIR will
lose it's dd_fd member again. Rearrange defines and includes to make
sense per comments, and not conflict on Solaris.