fix g++ builds: conversions from void * need a cast