Made poylfill actually work, and moved into a function that may be called later (e.g. on resize events).