Fix linking issues on Linux