Sketch2PDF uses an external script for the PDF file size compression which is a part of Ghostscript.
It may sounds complicated, but it's actually not. You just need to run a couple of Terminal commands.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ghostscript
If you want to stop running of Sketch2PDF on PDF export, just disable the plugin from Plugins → Manage Plugins.
Sketch2PDF is based on SVGO Export.