adapt to ROOT6 API changes

Fix compilation errors in two packages due to API changes from ROOT 5 to ROOT 6.