Correctly detect console global