workcache: Don't assume gcc exists on all platforms

FreeBSD has recently moved to clang by default, and no longer ship gcc. Instead
use "cc" on unix platforms (the default compiler) and "gcc" on windows.