Add Large File support related flags to the list required definitions.

This is particularly useful and will ensure that the compile/run test
are also built with the appropriate definitions.

As done in the "configure.in", also set "_LARGE_FILES" to enable the
support on AIX.
Completely backport XOPEN_SOURCE test from autoconf to CMake
Append _ALL_SOURCE, _POSIX_PTHREAD_SEMANTICS to list of required definitions.
Append __EXTENSIONS__ to list of required definitions.