sort environment variables to guarantee consistent order