Bugfixes; tostring and pudata polyfill.

Signed-off-by: katlogic <kat@lua.cz>