python interface code to throw same exception as c++ code
Avoid tests trying to catch std::runtime_error

Apparently, libc++ and stdlibc++ are ABI compatible when it comes to most
execptions. Except for (AFAIK) std::runtime_error. And somehow both libraries
are pulled in when compiling on some Macs. I have not quite figured where and
why. In any case, this makes some test fail.