Shared objects: Fixed various compilation errors.