FIX MSVC compile error C2036: 'void *' : unknown size

We were inadvertently using a GCC extension (pointer arithmetic on
void *). Fixes #2963, #3016.