Add noreturn attribute to thrd_exit on GCC.