Fix compile errors on Ubuntu