Fix accessing target data way

Replaced lua_pushcfunction with lua_register. The target data isn't sent
to lua so can access this properties with glue code.