detection against the empty haystack var was inserted.
duplicate path to xajax_js when not using deferScriptGeneration

wrapped $sJsURI .= 'xajax_js/'; in if condition to avoid double path
xajax_js/xajax_js
Merge remote-tracking branch 'romacron/master'
Merge remote-tracking branch 'sinza/master'