Changes to allow static builds on Linux