Fix loading of function pointers from library according to c++ standard.