Handle perls built without locale support

This is needed for the module to test & install cleanly on Android.