Adds beforeDefine to plugins (#263)

Prototype: beforeDefine(name, properties, options)