0.11.4+ compatibility using NAN

See https://github.com/rvagg/nan
Release 1.0.4
Fix resource leaks on read errors
Fix immediate variable reassignment
Merge pull request #307 from mscdex/master

misc fixes