fixed #1731:change struct to class
Merge pull request #2038 from minggo/iss1731-lua-declaration

fixed #1731:change struct to class