make the sm sharedfp component compile on Mac.
Need to protect libgen.h as some systems might not have it