Apparently #{ENV.cxx} does not translate to the correct compiler. A workaround is to replace this line with
ENV['GCCXML_COMPILER']='/usr/bin/llvm-g++-4.2'