Support sending native objects in XMLHttpRequest