Get rid of THREADFLAGS completely

Just prepend -pthread for linux