I would simply use A* pathfinding, but when in flank mode, simply add a high cost for all the sections around the player in front of them in an arc. Project a chord from the players position like a sight cone and make the pathfinding cost of this incredibly high, and your npc will find a route around and behind the player, avoiding their line of sight.
^^This. A* is guaranteed to find the absolute shortest path if your "cost" estimates are based on distance, and are admissible... but, even with a completely random heuristic, A* will eventually find a path to the target.
That's no fun for an AI that's supposed to be human-like though - humans never take the "absolute best" option! The "cost" of each node should be based on many factors besides distance-to-target, which will result in more human-like decision making.
You can combine A* very well with ApochPiQ's pre-processing approach. Ahead of time, rank each node according to many different metrics: e.g. how 'open' is the area, how many other nodes can you see from here, is the node on a high-traffic path, or is it off in a corner, etc... The more different measurements you can make on the nodes, the more interesting you can make your AI movement styles.
You can these use this data to adjust the A* "cost" of the nodes based on what the AI is trying to do.
e.g. If it's in stealth mode, then increase the cost of "open area" nodes, so that it prefers more hidden routes. If it's in combat, decrease the cost of nodes that are next to cover objects, so it will try to find paths that give the best cover while moving. If it's in a hurry, then just use the plain distance heuristic. If it's got a sniper rifle, decrease the cost of nodes that can see a lot of other nodes, so they'll prefer getting into places that are good for "overwatch". If it's a coward, decrease the cost of nodes that have friendly units nearby. If they're meant to be smart, increase the cost of nodes where friendly units have previously died... And for flanking, you can use braindigitalis' suggestion of temporarily increasing the costs of the nodes in front of the player. I wouldn't continually update this info as the player looks around, as that's magical knowledge for the NPC (they should only update these costs if they actually see the player change where they're looking).