Fix up some Makefile things for distcheck to pass
Cast through void* to remove clang warning