Replace startsWith and endsWith if startsWith is not spec compliant.
Merge pull request #172 from ljharb/fix_firefox_starts_with

Replace startsWith and endsWith if startsWith is not spec compliant.