add macos specific ldflags

proposed fix discussed in #25