Create share module and compatibility fixes

 - ADD: lib/utils/shared.js for code to be consumed by both node
   and client
 - MODIFY: browser detection to accumulate for the type of window
  in Safari and Firefox