haiku: build fixes around debug defines