Fixed compilation errors with the latest Slicer version.