Fix lua project template crash on iOS5.1 device

Per #6285, propogate fix to lua templates as well.