lib: tweaked inMemory
test: test/inmemory.js compatible with node v0.11