Replace PIL dependency with Pillow