Basic auto-detect for Ext.define(function) syntax.

A patch by Patrick Gleichmann.

Specs by me.

Refs #527