Make compatible with ownCloud 8

Some bloody hacks to make files_pdfviewer with ownCloud 8 working again..