add WideCharToMultiByte function for lua