Fix ajax string argument

The ajax.send function fails every time it is called with a string
parameter. This happens because the ‘send’ javascript function tests
for ‘params.$keys.length==0’ before checking if it is a string, and
strings don’t have ‘$keys’.

This change fixes the problem, and continues to work for the empty
dictionary case (when $keys.length==0) which is perfectly handled by
the ‘for’ loop over the length of keys.