First off, you might not need to use weinre, as there may be a better debugger you can use.  See the info in the yellow box, here: 
https://people.apache.org/~pmuellr/weinre/docs/latest/
- group()
- groupCollapsed()
- groupEnd()
If they aren't currently supported in weinre, they won't ever be, likely, since I no longer develop weinre.
Seems like the best workaround would be to just create no-op versions of them if they don't already exist, somewhere near the beginning of your code.
Eg,
if (console.group == null) {
   var noopFunction = function () {}
   console.group = noopFunction
   console.groupCollapsed = noopFunction
   console.groupEnd = noopFunction