fix compiler errors and warnings when compiling outside of ROOTCINT