Fixed wchar support, and a bug with relese builds for iOS