autogen.lua:52: attempt to call method 'split' (a nil value)

Getting this in both lua 5.1 and 5.2 installed using apt on Ubuntu 12.04.2 LTS.

    lua: autogen.lua:52: attempt to call method 'split' (a nil value)
    stack traceback:
            autogen.lua:52: in main chunk
            [C]: in ?

The attached patch fixed it for me.