Managing the environment and the economy in the presence of hysteresis and irreversibility