Fix static library linking on Linux