fixed define function to match AMD specs, now last parameter of define will be invoked immediately and should return some value, constructor or object