[BZ-1058322] add adapters of kbuilder, ksession and kbase options for legacy 5 API
(cherry picked from commit 7f2645c6dd0d8eaee3f2f9aedfafacf8fb0082a6)