add nan as a dependency
made NAN compatible