I started out doing something like the majority of the approaches above, but more lately I've switched around to being much more lenient. At this point, my standard is to consider what would happen if the PCs were to
1) roll the worst possible results (i.e. a modified 2- on reaction, the party being fully surprised, etc) during the encounter, and
2) did absolutely nothing to attempt to avoid hostilities.
If this scenario would result in a fight or any other negative outcome, but that didn't happen due to a party-member action or ability, then I assume that the encounter was "defeated". Avoiding the fight gives full experience as if it were won. That includes using evasion, stealth, deception, diplomatic manipulation, barrier spells, fear, illusions, whatever.
Since the majority of experience comes from treasure, this doesn't have a large effect on leveling rate (avoiding fights has provided less than 5% of all experience in my campaign, I'm quite sure). Maybe if players actually start trying to ticker-tape their way to the next level, I'll change my mind, but so far it's a distant hypothetical.
Bear in mind that this reflects my campaign structure, where players level up only once every 12 sessions or so. At a session a month that amounts to gaining only one level a year, so I still feel really stingy compared to pretty much every other campaign being run in my gaming group. I can afford to be more generous. Not saying everyone else should do the same thing, just that it's worked well for me.
The only thing that worries me slightly is that the party might double dip by coming back to avoid enemies (or just kill them) after already avoiding them once. I generally wouldn't allow that if the players choose to do it voluntarily, although I probably would if it were outside their control, like a recurring villain. Batman deserves exp every time he takes down the Joker, not just the first time!