A Generic Translation from Case Trees to Eliminators