Fixed global environ variable on mac and ios