Add -pthread to prevent make check build errors 

Debian and Ubuntu distributions need -pthread in LDFLAGS in addition to CXXFLAGS in order
for re2/ make test or the broader make check to function.