Polyfills for making games in the browser