Improve support when concatenated or minified

Prevents issues when concatenated or minified with other scripts.