Modifying registerCollection method to be compatible with both the 0.9.x and 0.10.x branches of sails core.