Upgrade library to run under Node 0.10.x [take 2]

fix merge conflicts from #17.