Added missing includes to ui.cpp

Fixes compilation on newer GCC versions.