Peerjs can't send modern javascript class instance objects if their constructors == class ClassName rather than Object. See binaryjs/js-binarypack#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.