tessel/runtime#637 r=@jiahuang: swap lua to use tointeger