Optimize the generation of class member function invoker in embind.