Fix compilation and logging C wrapper.