Extend to be compatible with requirejs