Use C++11 threads/mutexes in PDFDocument