fix _ALL_SOURCE logic to avoid possible redefinition of _GNU_SOURCE