iOS compilation fixes