An adjoint method for control of liquid-gas flows using a sharp interface model