Resolver fix for node 0.8.x and 0.10.x

This has been tested with node 0.8.16 and 0.10.4, seems to work correctly. Thanks!