Use macros to proper detect the environment.