Add -dynamiclib for mac support (#1)