Update raven.js to work around IE8 shortcomings

Internet Explorer 8 chokes on an undefined or null reference passed into this function. Wrapping an if statement around the processing correctly handles this while still performing correctly.