Include threads package

In an earlier commit, the threads package was removed from our
cmake lists file. However, this generates a linker error so we
put it back in.