This PR fixes multiple issues related to build failure of 3x build system.
Fixes https://gitlab.nic.cz/turris/openwrt/-/issues/351