Loading faye-browser.js fails because 'this' is undefined when checking this.JSON

When including faye-browser.js in my client builds the browser throws an error (due to 'use strict') at faye-browser.js:1448 because 'this' is undefined.

This PR fixes the issue by defining the JSON object when either 'this' or 'this.JSON' is undefined.