Electrostatic charging during the flow of grains from a cylinder