Added browser sniffing for using the correct matchesPrefix() function.
Renamed function matchesPrefix() to matchesFn()
Uses a global dummy DIV for testing. GC near the end.