Added cmake option to build static libraries