[WO-625] Catch exception on socket.oncert

Mozilla's socket is not extensible via Object.preventExtensions(obj)
and throws exceptions when non-prototype function .oncert is added.
The callback function is needed for the other shims.