Fix core.js for IE 8 support

var validator was undefined on IE 8