undefined variables caused problems when uglyfied

closes GH-198