Name the define THREAD_LOCAL and define it in every case

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>