Ensure ajax type is set for legacy calls

This sets type=ajax for all legacy requests using ajax.php as entrypoint.