test existence of window.msgpack
embed setEncoding in try catch