Fixed detection of browser so support for IE7 in place