Use locale only if $Config{d_setlocale}