Fix handling of ime activation

Some of the built-in IMEs don't show up as installed packages. So change to check for available IMEs.