more build fixes from sef@ix