Update riscv.ac to handle shared libraries

I think this could be a more far-reaching bug: this code was testing
for C++ libraries using C, which means it bailed out on a bunch of C++
standard library symbols.

The fix is simply to use C++ to link C++ programs :).
autoconf 88683321527916e4080adcae0e7d8d65ab55fc1b

Here I simply ran autoconf to produce a new configure file.