Fix problem with Json ajax request

Send XMLHttpRequest header and wrap _callback(data) inside a
function(error, data)