JavaScript: Execute function via namespace