Avoid importing PIL stuff until it is really needed