How to make a three bone IK?

Hi, I’m trying to figure out how I can do a 3 bone IK that works in a similar way to Maya.
When I try using FABRIK then the chain flips when I move the target in one direction, say behind the root bone.

It works well in Maya I would like to have a solution that does excactly that if possible.

Has anyone done this?

ik.png

Cheers