First check DOING_AJAX in is_entries_ajax_request

If DOING_AJAX is not true, it's not an ajax request.
This also fixes the unit tests because get_query_var
doesn't get called.

Fixes #122