Add static compilation on CMake