Spontaneous Emulsification in Ternary Systems with Mass Transfer