fixes to make libc build