Some small build system fixes

- The -mllvm asan-stack stack option is only relevant when compiling, so
  remove it from the link flags.
- ui/Makefile was including CFLAGS twice. Remove one of them.
- -ltinfo does not exist on some linux distributions. Remove it and let's revisit that
  when it's needed for 3.4