add is_ajax() method

by checking HTTP_X_REQUEST_WITH in server variable. not a good pactice
but it is working.