Add no-undefined and link to xdg and libs properly.