Fixed check for _GNU_SOURCE pthread extensions.