Added -pthread to tests' LD_FLAGS