changed so it builds dylib instead of so shared lib file (needed on Mac)

Not sure how this needs to be written so this flag only used on Mac though...