Search for dark matter produced in association with a Higgs boson decaying to gamma gamma or tau+ tau- at sqrt(s) = 13 TeV