Fixed issue where Modernizr is run within another scope, where this might not point to a window