only emit proxySocket on server if server exists

After upgrading to 1.5, my code started failing with:

    TypeError: Object false has no method 'emit'