Fix build on Haiku

* Move to Haiku theads vs pthread