Fix build errors for Ubuntu.