Fix handling for jQuery response headers

Fixes the way response headers are parsed when using the jQuery client. Enables the response headers to be properly viewed in the UI. Previous logic consistently returned an empty set of headers. Includes minor changes to allow the use of JS strict mode, at least for this function.
Merge pull request #99 from tillig/patch-1

Fix handling for jQuery response headers