my solution would be to use a standard form instead of ajax.
You can put a form in your html (or build it using JS)
<form id="my_form" action="export" method="post">
<input id="my_form_data" type="hidden" name="data" />
</form>
Then, when you want your data sent, using JS:
$('#my_form_data').value(JSON.stringify(data));
$('#my_form').submit();