Adding some fixes to make TestCExample work on Linux