Backbone.Relational does not work with require.js

Use factory pattern so that it also works with require.js