handle exception in image_data constructor - refs mapnik/mapnik#1927