Lightweight polyfills for modern javascript functions