SetupEnvironment() - move OS define inside function