Fix build errors with trunk