Fix a bug in the browser monitoring js injection when the head_pos is 0.

If you have no head tag, and the browser monitoring code detects your tag at position 0, then the content in source would be duplicated (see that the changed line would be source[0 .. -1] which == source). This fixes that problem.