Turn k2pdfopt into a library