Replace startsWith and endsWith if startsWith is not spec compliant.

Per https://github.com/paulmillr/es6-shim/commit/df63e85e6e377cb4eeee6c88f4beb36e824b8306#commitcomment-4890777