Non-thermal photons and direct photodissociation of H2, HD and HeH+ in the chemistry of the primordial Universe