fix linker bug for mavericks