Link pthread as private

This fixes the CMP0023 warning with cmake 2.8.12