Support legacy way to create InputMethodContext