fix ccache builds of gmp (reverts [4458])