fix ios compile errors