Fix cmake build and break iOS build