Use metaprogramming to only export C API-using functions after version selection