Fix compilation problems on iOS