[PATCH] Allow to choose to build shared or static library