Fix several compatibility issues with the Lean Prolog adapter file