IE-compatible startsWith implementation