The Labour Party has agreed to adopt in full an international definition of anti-Semitism, following crunch talks.