fix broken test
make doctest work with Lua 5.1
minor test cleanup
avoid testing for LuaJIT specific libraries