I usually perform the 'Leroy Jenkins' maneuver when faced with a sniper. Charging out of cover, screaming my own name as a battle cry and getting everyone around me killed. And then I turn into a "zombie" and stumble around aimlessly.
Or if a sniper is putting my team under fire, I threaten to beat the shit out of him later if he hits me. Usually works. lol
Really, though...you gotta be damn good at picking out well-concealed people from a fair distance. While I personally rely on the fact that I can dodge sustained fire from AEGs on open ground so long as I have at least half a second to react, knowing what to look for goes a very long way.
Though, you might be looking for more of a squad based reaction and anti-sniper maneuver.