Fix issue which prevented this working with pdflatex.