Fix Pandoc export for figures with caption (>= pandoc 1.12.1)