doTeleportThing fix

I have no idea what went wrong. After compiling newest source all scripts which use doTeleportThing drop something like this:

Lua Script Error: [Spell Interface]
data/spells/scripts/support/magic rope.lua:onCastSpell
data/compat.lua:678: attempt to compare number with userdata
stack traceback:
        [C]: in function '__le'
        data/compat.lua:678: in function 'doTeleportThing'
        data/spells/scripts/support/magic rope.lua:16: in function <data/spells/
scripts/support/magic rope.lua:1>

This commit fixes this error.