Portable mongodb implementation for browser and node.js