Make the program work even with Pillow (thanks Matěj Cepl)