Added polyfill for typed arrays