catch deprecated Image library import method

This should work for both python-pillow and python-imaging