add option for static linking