Fixes to support ios build.