cmake: fix ccache command when using host ccache (patch from #9611)