fix to make it work for requirejs