added -lmx on macosx