Fix IE errors, add History polyfill