A port of jQuery.extend that actually works on node.js