Prevent Promises polyfill from conflicting with AMD and fix build.