Fix leak in ibus-engine-switch test

BUG=http://code.google.com/p/ibus/issues/detail?id=1712

Review URL: https://codereview.appspot.com/104860043
Patch from Christophe Fergeau <cfergeau@redhat.com>.