Don't use SSE2 instructions on Haiku.

We still support older architectures, so we don't want this. Since the
env CXXFLAGS are appended to the one set in the cmake files, there is no
way to force this in the CMake project.
Fix build after Haiku API change.
Simplify some checks for compiler version and OS

No functional change.