The shell currently does no downconversion of ensureIndex when connected to a legacy host or when the shell is in "compatibility" mode. This prevents scripts written for the 2.6 shell from working properly against older hosts and prevents our regression tests in jsCore from covering the legacy index write path.
Fix is to emulate a command response by creating the index via a safe write.