Fix some compiler issues

This patch fixes some compiler issues I had to deal with on my system. Note that (void *) is not valid C++ for function pointers.