I don't buy the whole lusting thing as it relates to masturbation. IMO, you don't have to be lusting in order to touch yourself, and vice versa. So, other than the lust, the only scripture that I recall, that is used against masturbation, is the one from the Old Testament where Onan was required to sleep with his dead brother's wife in order to impregnate her, so that his brother's name would continue. Upon sleeping with her, he pulled out and spilled his semen on the ground. He was struck dead. Does that condemn masturbation? I don't think so, and certainly not directly. It would seem to me that him being mean, being dishonest, etc., were probably more to blame than the fact that he spilled his semen, since, in other parts of the Old Testament, it was discussed how a man could cleanse himself after having an emission of semen, and no mention was made about what caused that emission and it being a sin.
As to the sermon that Jesus preached, where He said such things lusting after a woman was the same as fornication, and hating was the same as murder, here's I question that I have. We know that Jesus came to fulfill the law, and to justify people apart from the law. Apparently, however, some people thought that they were saved by keeping the law. Did Jesus preach all of that in order to show them that they DID need a savior, or was he simply giving us newer, and harder, rules to live by? I'm undecided, personally, but Galations would seem to point out that we ARE NOT under a stricter law than the Old Testament one, in my opinion.
[Edited for spelling]