add pthread to LDFLAGS