updated amdefine; much simpler injecting now

require('amdefine') returns completely self-sufficient function
so it can be used directly for injecting