Fixed compile errors on stock Ubuntu