Set the variable allow_css_double_underscores and reset the cache.
$value bool: A new value to be set to allow_css_double_underscores.
function setAllowCSSDoubleUnderscores($value) {
$GLOBALS['conf']['allow_css_double_underscores'] = $value;
drupal_static_reset('drupal_clean_css_identifier:allow_css_double_underscores');
}