CORE: some changes to lua bindings for luajit compatibility
note: a function accessing its parameters on the stack cannot use negative indices if the function can possibly be invoked with no arguments: negative stack indices with no arguments will return as not nil, will pass isnumber, and will return as 0 from tointeger