Cache document, Math, undefined

Closure to cache document, Math, undefined -- should result in a very
slight performance improvement and smaller minified size.

(note that undefined doesn't need to be passed in as a parameter -- by
default any parameter not set will have the value of undefined)

PR 34