Updated correctly build static/shared based on --enable-static