Tolerate case where Session middleware is disabled

Found that when session middleware is disabled, the logger is unable to generate the XML to send to Airbrake.