fixed test for empty variable in configure script

Search for lua binary if *not* found/set previously.