updated for lua 5.2.3, Xcode 5.