add static linking flags and libraries