Check for presence of cmake in build script.
Fix cmake error when Lua not found.
Build script now allows to enable/disable Lua and UCI explicitly.