(Apple) Reduce dependencies on apple_is_running global variable