Added polyfills for tests in old browsers