pin pandoc version, and modify to fit pandoc api change