CXX-349 add option for dynamic libs on non windows