Fixed some issues preventing successful builds on Linux