[MODCLUSTER-381] Stability and portability issues in native code (contri...

...buted by Jan Andres)