Update polyfill.js

Convert to current (dojo 1.8) conventions for Deferreds and Promises