Prevent crash when using non-existent locale

As the comment says, a quick and dirty temporary solution to the crashes in Android with non-existent locales.
Merge pull request #14 from Tiago-Ling/patch-1

Prevent crash when using non-existent locale