Test for readystate=4 first to avoid error logging in IE

When checking HTTP status for AJAX calls in IE, the readystate must be 4 before attempting to tests status, otherwise the status is not available