Backported ios framework build changes from master