Fix calling  in  anonymous function to set locale and cache, fixes issue #108
Making setLocale and setCacheSettings public to fix problems with < 5.4, fixues issue #108
1.0.4 bugfixes