fix vtable malloc to use appropriate pointer type for sizeof