Avoid installation failure when locale cannot be determined

Hotfix to patch our own fix for Django bug.
https://code.djangoproject.com/ticket/16017
https://code.djangoproject.com/attachment/ticket/16017/16017.diff

We have 2 reports of users hitting this, and one report of people on our side hitting this.

I've tested this manually.