Measurement of branching fractions in radiative B decays to ηKγ and search for B decays to η′Kγ