Fix static linking on Linux