fix so it compiles on os x / clang

I didn't test with gcc or on linux so caveat mergtor