Put grid object in global scope even when loaded via Ajax

Mass actions in an ajax-enabled grid are broken when the grid container is loaded via ajax such as in an ajax-enabled tab. Adding window to the variable declaration forces it to be in the global scope so the following ajax requests can access the grid object.