Fix compile errors on Ubuntu

Set the GCC compiler flags properly. Add missing include.