Added browser support

* Code is now function wrapped for isolation
* exports and module.exports are now conditionally set based on their existence
* In the browser, library functions are added to a kew namspace on the window