shims for browser compat
speed up
Merge pull request #57 from juliangruber/compat

browser compatibility