Fix import for recent versions of pillow