Update BaseController::renderJSON to correctly handle themes.