fix signed/unsigned warnings, query pkg-config for lua flags