Add option to build static lib.