Properly static lib packaging

Fixes #18574