socket.io does not work as package app

I'm writing a package app for Chrome (23.0.1271.1 dev-m) using client nodejs for TCP sockets.

However, this line

var socket = io.connect('http://'+SERVER_ADDRESS+':'+SERVER_TCP_PORT);

is throwing following exception

unload is not available in packaged apps. 

I cannot locate any "unload" method, what's failing?