[core] Switch to static libraries