NTFY-2: check that headers are defined before setting them as they can end up as "undefined" Strings when queried on the server side

git-svn-id: http://anonsvn.icesoft.org/repo/icepush/trunk/icepush@37297 1de00972-ac04-4911-a46b-06793c8d78d9