Adaptive pathfinding by nucleokinesis during amoeboid migration