Haiku: drop BEOS_THREADS as it is unstable, and fix some ordering