Fixed DOM Exception 12 SYNTAX_ERR

Fixed bug in $.ajax that was throwing exception caused by populating request headers with function names along with legit header info.