Better handling of ids when generating PROV-JSON