Peerjs can't send modern javascript class instance objects if their constructors == _class ClassName_ rather than _Object_. See https://github.com/binaryjs/js-binarypack/pull/13. Peerjs imports js-binarypack and includes it in the dist, so the fix for Peerjs is to include a patched version of js-binarypack.