wimlib_export_image(): improve duplicate image detection