Search for associated production of dark matter with a Higgs boson decaying to $b\barb$ or $\gamma\gamma$ at $\sqrts$ = 13 TeV