fixed minor error where spatial.js had a node.js require at the top;