Improve compatibility with Chrome 7-10.

Ancient Chrome versions, before strict mode, never pass null or undefined
as "this" to a method.  They pass the global object instead.  Add an
explicit check to String.startsWtih and String.endsWith so that we
throw the TypeError that our test suite expects.