making tests compatible with node 0.10.x and changing the way pty.js is handled as an optional dependency