fix linux & osx linker flags