C build fixes