remove unnecessary linker flags for macosx and linux