Fix for compatibility with RTD PDF generator.