Trying to make a tiny plugin system in c++