Measurement of Higgs boson production in association with a top quark-antiquark pair in final states with leptons and hadronic taus