Added shim for es6 promises (hopefully works on mobile safari