Do not import local Pillow for building docs

This finally fixes #1030.