remove -pthread from libs

we should get it from cflags, I think