Bugfix in C reference code for a test
Revert to gcc for building llvm trunk

but set LD_LIBRARY_PATH to allow custom installs of gcc
and rejigger the Makefile to respect existing LD_LIBRARY_PATH settings