Fix pathJoin with lua 5.2

According to http://www.lua.org/manual/5.1/manual.html#7.1, this was
already deprecated in 5.1.

The fix used is a simple way to make it work in both.

I'm not a lua wizard, but this makes the game start with my self-compiled moai 1.5 (on archlinux) and still works with the shipped moai 1.4.