Carrier-envelope phase stabilization by controlling compressor grating separation