improve npm header for browser + nodejs compatibility.
use new Date().getTime() when not in a node.js environment.
Merge remote-tracking branch 'bhouston/window-performance-fix' into dev