fix duplicate symbol error when using -fno-common