Fix for 'locale.Error: unsupported locale setting' in python 2.7