Use 'setRawMode' only when defined as a function

In a lot of environments, 'setRawMode' is not defined as a function which breaks grunt execution. Please fix this and create a new package.