Remove unknown function in socks.js and make _sockjs_onload a bit more declarative