Fix memory leak in InputMethodOptions