{
  'conditions': [
    ['OS!="win"', {
      'targets': [{
        'target_name': 'pty',
        'include_dirs' : [
          '<!(node -e "require(\'nan\')")'
        ],
        'sources': [
          'src/unix/pty.cc'
        ],
        'libraries': [
          '-lutil',
          '-L/usr/lib',
          '-L/usr/local/lib'
        ],
        'conditions': [
          # http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html
          #   One some systems (at least including Cygwin, Interix,
          #   OSF/1 4 and 5, and Mac OS X) linking with -lutil is not required.
          ['OS=="mac" or OS=="solaris"', {
            'libraries!': [
              '-lutil'
            ]
          }]
        ]
      }]
    }]
  ]
}

{
  'targets': [{
    'target_name': 'pty',
    'conditions': [
      ['OS!="win"', {
        'include_dirs' : [
          '<!(node -e "require(\'nan\')")'
        ],
        'sources': [
          'src/unix/pty.cc'
        ],
        'libraries': [
          '-lutil',
          '-L/usr/lib',
          '-L/usr/local/lib'
        ],
        'conditions': [
          # http://www.gnu.org/software/gnulib/manual/html_node/forkpty.html
          #   One some systems (at least including Cygwin, Interix,
          #   OSF/1 4 and 5, and Mac OS X) linking with -lutil is not required.
          ['OS=="mac" or OS=="solaris"', {
            'libraries!': [
              '-lutil'
            ]
          }]
        ]
      }]
    ]
  }],
}

Tweak binding.gyp so it doesn't error out on Windows