bump to 3.1.1 and use new requirejs syntax