[fix] very painful issue with compilation. Moral of the story: always compile with clang++ and loathe apple for -stdlib=libc++