Fixed import problem when using Pillow in place of PIL