Fix modernizr tests

Modernizr tests were failing due to incorrect encoding and invalid alert function overload