Fixing session.cc

- adding code as described in https://github.com/rvagg/node-libssh/issues/15#issuecomment-42855769