Fix for Python 3 (from - https://github.com/nschloe/matplotlib2tikz/issues/20)