Germany has agreed to pay compensation to Jews who suffered persecution in Algeria during World War Two.