added autoconf macro to find C++ functions in foreign libraries