Adding compatibility for AMD - requirejs