Chemical control of hydrodynamic instabilities in partially miscible two-layer systems