Revert "static linking"

This reverts commit 988da4d17e5c9d4d5771a67812e3fcf97feadf2b.