thread: cleanup private thread includes.
build: -D_GNU_SOURCE.