changed way of assigning primitive stubs to work in browser and node, even if minified