Control of two-phase flow in a microfluidic system using ac electric fields