Use _GNU_SOURCE or _DEFAULT_SOURCE if defined.

Removed warning from deprecated _GNU_SOURCE.