Extracts the full compiler path and feeds it to cmake.

Previously, specifying the compiler name with a variable
to configure ("configure CC=gcc") lead to CMake complaining
that <builddir>/$CC was not a valid path. This patch fixes
this by extracting the full path with "which <compiler>".
Should fix issue #355.
substituted which with command -v.
Change which test for cmake28 to use command -v.
Merge pull request #356 from blattms/fix-compiler-path-from-variable

Extracts the full compiler path and feeds it to cmake.