kbd: merge fixes/patches from Alpine to allow musl builds.