Merge in Haiku fixes from BrickViking. (Later amended for a clock skew, caused by checking this in from a HaikuOS VM with a wrong clock.)