tools: fix mac build for latest Cg and Xcode