Add support for customizing CC/AR/PREFIX.  Merge darwin and linux
platforms with clang fixes based on push from @igalic with fix for
darwin compilation.