added a detect os check to enable libraries for mac