Added check for modernizr as it appears to be giving some issues on some
browsers.