moved handlers inside modernizr check