The problem with the "God defines what's good and evil and so anything He does is by definition good" argument is that it means that religious genocide is not wrong, because God does it.
So. Would a military campaign, wiping out the muslim population of the middle east and replacing them with Christian settlers, be justified? If not, why not? God did it.
Insistence on reading accounts written by people whose conception of God was extremely primitive and above all tribal as literal accounts of the nature of God is a sure-fire way of getting the wrong end of the stick. It is exactly what Jesus' disciples did - "Master! Shall we call down fire on them like Elijah did?". I note Jesus' response was "You do not no what kind of Spirit you belong to". The understanding of God evolved through the OT - it was written over hundreds of years. These atrocities are part of an early tribal conception of God and give a totally disordered picture of Him taken literally and in isolation. To put it bluntly, I, and many other Christians, do not believe that God ordered the genocides recorded in the OT.