Fix building with USECCACHE=1.

This fixes the variable expansion and building with CMake.