fix(js-sdk): detect web platform objects by shape, not by class (#1618)