RMT agrees to consult members on Labour Party affiliation