IE compatibility-mode fix

IE compatibility-mode was causing script to give error